package com.hezhou.oauth2.web.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hezhou.oauth2.web.entities.SysPermission;

import java.util.List;

/**
 * ---------------------------
 * (SysPermissionService) 系统权限逻辑层
 * ---------------------------
 *
 * @Author: [hezhou]
 * @Date: 2020/3/6
 * @Version: [1.0.1]
 * ---------------------------
 */
public interface SysPermissionService extends IService<SysPermission> {

    /**
     * 根据用户id查找对应用户的权限信息
     * @return
     */
    List<SysPermission> findPermissByUserId(Long userId);

    /**
     * 根据手机号查询出登陆用户对应的权限信息
     */
    List<SysPermission> findPermissByMobile(String mobile);

    /**
     * 根据id删除权限
     * @param id
     * @return
     */
    Boolean deleteById(Long id);

}
